adjust options width to content

+ code reformat