Fixed issues with setting properties
Added Tests