syntax clean up and small refactorings
Add VERSION and use it