Different approach to geometry type
Moved stuff around and added some more functions I needed