Fix various syntax errora and typos