Finished Register machines implementation without monads