This code contains contributions by:
===
Petter Johansson
Matthew Woelk