Large commit. Changed resource organization to make it more clear and
responsive.