important updates and bug fixes

and update all headers