Added UIManager and fixed file chooser bug

Just added a UIManager and fixed a small bug with the file chooser.