Some cleanup: Converted anonymous implicit classes to implicit classes, fixed formatting and imports, etc