Cleanup

It is not a complete cleanup, but that all I can do at the moment.