paperclip 4 upgrade, devise 4 upgrade and minor changes