Refactor


1. move all tmpl files into tmpl direcotry.
2. remove duplicated code, move common parts of crud.py and xuanwu.py into base.py
3. trivial fixes.