Simplified the tests
Simplified readSlice
A round of refactoring