Reformat code and optimize imports
Fix IDE warnings