Refactored code to have more meaningful method signature, clean up unnecessaries and added more test expectations