Changed the state management to use events. And started working on a new vector class.