A simple Turing machine implementation