Remove port and comments from js