Made a visual debugger. Some cleanups. Move mpos to visual debug.