-Cleared up syntax errors.
-Modified function calls to loglet() as per discussion
-Added print statements in various locations. (uncomment stop() calls to halt the program at these locations).