Merge pull request #251 from dreamteam69/master

More debug stuff
Merge pull request #252 from dreamteam69/master

Clean up the dirty loop