Fixed introduced compile errors and intellij warnings. Ifdeftoif parser needs to be looked at.