Made the entire process of processing an image async. Fixed #19 but may have unintended side effects.