Compilation fixes. More things need to be static--- running out of space.