improved Vector3 and refactoring