Fix some style and linking issues