Fixed several bugs, and added write/save functions to save edited jass