Fix issues with slabs
Tidied up I/O
Added read() method