Add unit test, fix constants