Using Maps instead of Seq now, refactoring resource mgmt