Added deinitialization routine.
Unfortunately, I've forgot to add it in the initial commit.