Rewriting Level class to be more testable