compile control flow statements and other fixes