Made some utility methods more generic.
Added more utility tests.
Fixed a NullPointerException when using the request command.