More refactorings; add .idea project files