fixes for version handling and some cleanups