cleanup, simplify, optimize
Merge pull request #3 from brightbytes/mm/feature/refactor

big refactor