Some clean-up mostly

I was not able to try it since I don't have the env's (and was too lazy to pick them from the history ;-))
But if you have any issues, let me know