Modified hitpoint functions and added this keyword where necessary.