hell lot of fixes #469 #427 #482 #466 and others
merged in latest changes.