Added withCookie wrapper method
Added new methods
Added test and fixed bug
Adding more tests