Implemented the rest CG method for use with the structure velocity in the functional. Code could still stand to be cleaned up.