Core/Misc: Remove trailing whitespace, compile warnings and minor cosmetic changes