Replaced makros with typedefs.
Fixed some typos in comments.