changed to sequence struct (still has one seg-fault in test_manager.c ...)
added some ddocumentation and logic for freeing memory