Several small fixes for mac system and needed additions.