Added Exception, made stupid things in StatusAutomat