Removed redundant scripts, beautified code