Many updates and bug fixes