Splitted the js files and introduced format option