corrected statistics
corrected upload controller
made it jruby compatible
minor fixes