Restructured code
Addressed issue #63
Merge pull request #71 from simongog/cleanup

Addressed issue #63