Made factory a singleton, added UserInput

Introduced File dialog freezing bug.