Improved error message.
Removed unnecesary return.
Added more tests