beautify and fixes