Making frames to load on startup instead of show.
Centralizing common code.