Formatted first code, and added code count, plus some debugging stuff