Mastermind files with some refactoring