Edited the Coordinates class and added exceptions