Replace magic symbol with constant.
Added some more tests.
Clean up.