added a lot of tracking plus tracking for errors, minor bug fixes