cleanup and some Coordinate code moved into its actual Class file