Add bug fixes and various syntax fixes.