First commit, mostly finished