Removed old flowchart image.
changed gitignore to ignore visual studio project files and directories.
Added some #ifdef directives to things that should only be done in debug mode.