Integrated many improvements from v-p-b

Integrated many improments made to the v-p-b's fork. Thanks a lot!