re-structuring source code

move classes into modules and add documentation