folder structure and rework of code