Complete re-write of the code
Removed redundant and unused code
Fixed a few logic errors
Cleaned up arg parsing
changed version to 0.4.0
Merge branch '0.4-branch'