Added file browser and cleaned up some code