implemented new freezebuffer/keyframe system for the history. Started work on layermanager