Massive cleanup of file layout and separation into distinct files v1.0.3