Initial fully working revision sans extra credit