Clean up and fix prefix unit file generator