first phase of code review, deleting some code + cleaning