Refactored code
Fixed typo
Fixed return value
Added unit test to check for returned value on create