Format Code and fix warning