added viewer before editor
basic save file functionality