Cleanup and general compilation readyness.
Fixing segfault.