Change to use actual PAGE_SIZE, don't assume 4k
Add some bad protection for negative numbers
add more debugging info
keep note of issues I have