some code cleanup and a tumblr uploader