fix warnings
fix misc code styles