woking on big refactorings + fixing inspection warnings