cleans up code, uses only fs for file reading and outputting posts and content