Updated process var to be its own Class and cleaned up code