Updated license
Code alignment
Correctly handle null values