Initialize resources/lookup table in -init.

Also some whitespace cleanup.