More fixes, from Ema

Several small things, undefined vars or wrong locations/names of files or classes.