Code beautification: appointment functions