Added code, tests & docs