Fixed version number and cleaned up code