Cleaned up RPIServer code, removed unused variables and methods