Fixed statemachine to basec mapping and added new builder.