Split test from app ns and simplify struct

There is no need to add test into app ns which can run indepently. Just
ignore the demand of testing mixture code (front-end and back-end) and
test nodejs code alone!
Complete commit, see last commit for marjor changes