Major online code cleanup