Removing trailing whitespaces and minor formatting