Numerous minor improvements