Improved styling, added references, added tests