General improvements/fixes