Refactored start up code
Refactored start up code

- Not hooking up to events until we're done with the initial import
- Setting the active window before reacting to the initial idle state,
  since that could have an effect on the saved value of the active tab

Cleaned up old unused values

ricardojmendez/relevance,ricardojmendez/relevance