Opening and saving file improvenent; code style update. Closes #1