rebase
Worked on memory functions
Worked on structure
Added tests
Reorganized structure
Merged manually