Almost done with notepad feature -- some difficulties updating the database properly