Fixes & improvements

I did some adjustments + added some missing things. Detailed changes can be seen in commit messages.