Add stringfmt function for formatting errors
Add small usage of coordinate calculation functions, pending completion of big one.