Major structural changes and cleanup