Moved some comp geo functions into their own file