Massive cleanup of file layout and separation into distinct files