Added logic for maintaining new configuration items when new ones are added.
Refactored index handler.