massive refactoring
updated version number