tidy up spacing, add missing semicolons