adding some real unit tests
make Agent it's own class (not an inner class)
add some reasonable timings to the tests