Implemented fixes requested by Tom