Cleanup

Did a little cleanup of the code, seems like the cookie is not needed.