Advanced options

Make some minor copyediting and bug fixing.
Not sure if this is a good thing, it's less performance and look strange with the rest of the code (for this part only).