strip trailing whitespace
add optional callback
move db config inside app directory
update db include, newlines