Reduce unsafe code
Minor comment rewrites