refactored the code, and cleaned up the mess I made yesterday. Everything is working again.