Restructure, add delete funcs, add proper tests, etc.