Added rounded borders and optimize position loops
Fixed bugs because loop optimization