Refactored state package factory methods into an UnlockStateFactory at t...

...he

package level.