fixed formatting on switch statement
fixed some ConcurrentModificationExceptions