Code format and method cleanup