fixing warnings and indent