cleaning the code

removendo redundancias, limpando warnings, boas praticas