Add factory reset.
Add tests for invalid usage.