git ignore updated to exclude debug dir. more main refactoring