This reverts merge request !53 (merged)
Only some minor changes and commenting.
merged
mentioned in commit c655e4eb