Second exercise. Refactored johnny-five stubber