-Redirect and some fixes for strange intellij issues