Vars initialisation optimized
Use lists instead of maps
Brackets fixed