Got the framework mostly going, segfaults though