Made some of the protected methods public. Made trustProxy() return the current value if no argument is passed.
Added some basic tests.