Fixed all remaining bugs

The package can now figure out what the line height is by itself and
scrolls appropriately. It is also able to detect the beginning and end
of the page and keep the cursor within the page bounds.