fixed source formatting issues and typos