Add equals and hashCode functions to Vector3 class
Minor refactoring.