Converted imgur upload script to OOP design