Storage controller refactoring and added more test cases.