Some proper fixes, todo, get rid of stupid PAGE_SHIFTs everywhere.