Move distance class out of Position.java