Get back get_head, get_end and get_first

They're necessary to commands s, a, w and Shift+w.
Merge pull request #142 from eagletmt/fix

Get back get_head, get_end and get_first