Minor changes, deleted unused variables