fixed most of the sensible compiler errors