Added and fixed some functions in the geometry class