added .
added .
use express content-type helper
added more tests, changed debug handling