updated lib to support new db schema
added dirty json tags export
cleaned file
updated schema