Rewrote to use different data structures. ROM mostly finished