Refactor class to sepaate things a little bit