This might work. If you are happy with using it in production I will rewrite the API queries. Just keep in mind that in some places I might have to fire off multiple queries where I currently have a single query.