Fix Style Bug and Rewrite Errors