Core/Misc: Removed unused defines, added missing include and removed a few warnings
Merge remote-tracking branch 'upstream/master'