Clean-up + modifications for using IntelliJ as main IDE