Full code review

Delete if not used anymore.