Refactor, extract classes