Update for intellij
Cleanup & reformatting