fixed some issues, based on the unit tests, created unit tests for the resources as well and they all pass now.