Delete user function added; code improvements