Move functionality from main() to run().
Working GUI \o/