Some formatting and semantic fixes