Beginning and end keys

Merge back into master