A number of small syntax bug fixes and small code cleanups.