Refactor classes a bit