A bunch of code for the posts route. I can't wait to finish cleaning this up.