Have a moment of inspiration and reduce almost all the methods to one-liners . Added some tests.