Updated comments and added const to determine wait time