Removed useless js code, enhanced comments and beautified code, fix a big with password validation