cleaner js appointment#move code