Start reworking on refactoring code acc. to szezso's commits