Convert KippoGeo class to RedBeanPHP and tidy up queries