Added `getState` method to factory

Resolved #3