Formatting and added testcase for clearAllRecords