more compile fixes and some style fixes