AC phase control tweaked and cleaned up