Cleaned up repo main controller