Did some general syntax cleanup and fix comments