Rebuilt pin(), unpin()

There is a significant error at flushPage() that I have yet to figure
out.