fix code smells