Code cleaning; 1.7 deprecation updates