integrated postgres instead of using partials, updated layout with better partial use, refactored post retrieval