Removed blank text pages and fixed some bugs
Should probably sanitise this input as well.