numerous style improvements