IDEA stuff

Copied IDEA stuff.