Initial, working version.