Merging changes from Master Phrack (I hope)