Polished and refactored code

- K&R style syntax
- public only when necessary
- PascalCase for fields
- some other minor refactorings
Merge pull request #340 from nippur72/source-maps

Polished and refactored code