Merged a few things from iodoom3.

Signed-off-by: revelator <ralphengels@gmail.com>