Completes all planned functions--needs debugging