fixed lots of compilation errors; compile often!