refactored phase 1
debug output to /tmp/mastercore.log (sorry hard-coded)
internal class renaming CMPxxx (Class Master Protocol) and misc clean-up