major refactor in progress.
Merge pull request #6 from mpath/major_refactor

major refactor in progress.