Re-factored the source to use the new coordinate classes