Reorganize the source according to #197

This closes #197 .

This PR reorganizes the source code accordingly to #197.
@neithernut , @manuelmessner , @TheNeikos I would like to get this
reviewed _really_ carefully.