Final commit. Everything works except returning from programs. Sigh.