more removing 'long' as a type (this fixes BMP loading on mac, as if anyone cares)
fixed warnings in compiler
added logging for missing texture.