Refactor contest2nd