remove unused code from post view