Fixed compiler errors, remove unused variables