Added remaining functionality of tail and head deltion.