version and some code fixes