Fully implemented changes and added file opening

test code connected to test button. Known bug: crash on file open(file
in use.)