Tested LOOP and WAIT, beginning to integrate external functions,
validation