Refactored State into a common util class, added special exceptions for State, StateExpiredException and StateParameterDisabledException