File structure revision

Also added template in testmain.js
Updated README
No significant content change