fixed editing users and tidied other stuff