Fix error with capital letter
Implement unscaling of coordinates, rearrange code