debugged hardware, made a few changes to the code in the process.