Completed first draft of the algorithms
Added some of the answers