schematool: refactored, now uses new and improved API.