factored in weak references and friendlificated the API a bit