minor changes and some warning fixes