Minor changes. Integrated with WK. Segfaults by 'make'