bunch of updates and bug fixes