Refactor Main folder