Fix trailing comma, missing semi-colon and fix #5.