Reorganized code and chagned dataset tested on in memory_test.