using an anonymous function in the container is now optional.
fixed a bug in the request class.
added some phpdoc.