questgen - initial machine and restrictions implementation