Minor logic improvements. @todo create some sort of unique field that also handles reserved values.