Removing new javascript instance lines to other file