Added range factory and tests for item factory