Fixed compile bugs. Tracking down a seg fault now.