add test cfg and input file
many fixed

It's not broken anymore, yey!
get rid of TMP var in dec.f