IntelliJ port.
Initial manuscript import.