919561: refactored some code into additional methods, fixed naming conventions, and added test cases