fixing formatting, typo and other problems