fixed small error if title not found by regex (array index exception)
modified db insert code so that updates now return the modified content.  modified insert code so that the meta data is more useful programmatically for detecting success and failure. modified ui code so that edits now work.
tweak order of flipping so content isn't lost when fields are reset
cleaned up code
adds escape-key to clear search
lint cleanup
file cleanup