Adding custom post function and a few style comments