Messy commit. Code cleanup tomorrow.