Fix null value setting
API simplification
Changes due to refactoring