Moved image input out of class constructor