Cleaning up the anchor scroll code for post controller