Account model refactored, test cases added