Enhanced to generate SlaveProtocol.java partially with imports.