Added clear method. Fixes #3