Small stuff:
editpin() checks if current_user is pinner
upload() checks if Title field was filled in, has better returns