Added DS to handle free pages
Simplified some pointer stuff