optimizations and better folder structure