Added DebugWindow and some image processing.