resource system huge refactor.