huge refactor, mostly coding standards
Merge pull request #14 from tmpduarte/refactor

huge refactor, mostly coding standards