Refactor to nice class