Reformat debug and add for insert funcatinality
Add debug output
Fix a bunch of compilation errors