Add Program class, README and fix a few bugs.