removed extraneous code from generator + cleaned up posts controller