code cleanup: update to the new js features
adding a clear function to clear out the objectstore