add nullable as final constraint and minor fixes