First commit, working version.