cleanup code and make IllegalStateException clearer when the TypedFolder2 can't be instantiated