Tests/request

Wrote a ton of tests. Cleaned up some code. Documented some stuff. Added missing methods.