Being a bit more flexible in the return line.

Also adding more unit tests