Separate levels into sub-levels, some general cleanup