Moved the main logic to lib module; Added unitTest
JS-beautify