Revert "Porting to IDEA, part 1."

This reverts commit b0f193c38d42913744057c2772b650ec2c88ac04.