Refactored code into BadGameLibrary.