changed API so that beans implements DirectObject instead of extending it