Bug fixes and new version scheme

+1 for the inline comments