Refactor from TDD test to individual classes in Core