more complex tests passing for Machine make change. Refactoring of code.