Reformat Code and Fix Adapter