Update AutoFormat.java

Brought in AmnonOwed's changes.