Final commit, cleaned for HW submission.