rebuilt frame and many classes.

The goal is to seperate most I can for ease of navigation.