Added ending newlines.
Escaped type field in db scheme.
MySQL upload fix #1.