Working but still lots of debug code.