32bit support, cleanup, cmake stuff