Minor improvements and fixex