Cleaned up unused variables and methods