updated move,move down to make use of first and last

This has resulted in no longer having to track the top and bottom
palettes in a variable.