NS fix + Code style enhancement by use of extensions methods.