Fixed a bunch of preprocessor errors

This includes the addition of the [bug] WML tag, ported from AtS
Removed HIDE_GATES functionality