removing orphan javascript