App config makeover.

Adds more flexibility by introducing config objects
and inheritance structure between them.
Adds *iml to .gitignore.