Refactor all request parsing into the library