Cleaning and debugging

It's starting to look interesting :-)