Small changes to some classes to improve functionality