Updated posts controller