Added paperclip gem; refactored code in accordance with deprecation notices