Merged latest code improvements