Fixing stuff with API output being output twice

Also some code formatting and a redirect from post/show for clients such
as CartonBox so you can actually view the image after opening it in the
browser on the client.