Added more unit test coverage on modifiers and fixed some logic