Implement basic engine
Improve readability
Cleanup and add more comments
Merge pull request #46 from fluxroot/develop

Develop