Refactor domain model, code still contains errors. WIll be fixed asap