Tidied core code
Using explicit values in tests