Use class_attribute instead of class_inheritable_accessor
Use define_callbacks and add (after|before)_upload
Use run_callbacks instead of calls to callback