Security fix and some minor formatting