code cleaning and debug booleans