Cleaning up and last bug fixes of performance improvements;