Improvements

I have made several fixes and improvements (from my point of view :-)) ...
Good point, I'll make some changes and update the PR ...