Multiple modifications and bug fixes