Made some changes

Made enable/disable editing functions.

Misc bug fixes