Added remove method to remove objects by id.

Made some improvements to the example.