Rewrote data system and optimized code.