Compartmentalization of builder js and added a lot of expanatory comments
Accidental delete reverted