seperating domain logic from the DOM