Cleaned up admin postgres querys, uses tables/etc