fleshing out run loop. added doc and term class files.