Clean up resource dependencies.

Clean up resource dependencies and make things readable.