Some js little helpers