- added a function for getting the version number
- cleaned up the code