Added main method, temp. UI window, error handler