Added functionality to allow the NPC to lie down

Added more documentation

Fix spacing

Finally fixed all the spacing.