Refactor to make it clearer when starting and ending levels