Update: Changed location of InvalidStateException class