Fix #1 bug and added parse cookies

I don't use static methods in code.