Added main loop (with incomplete instruction set)