Improvements, warning fixes and stuff