Bug fixes: keep frame size, next/previous page, merge sort algorithm