Completed gproc refactor. There is still some problems that cause tests to fail.