Updated to the latest patch changes and made style corrections.