Small code improvements
Thanks to MarioLiebisch and Oberon00