Add more documentation to the algorithm component

Still need to add in what each function does and what it is actually
returning.