Cleanup code and add intellij run configurations