Add files & adapt to stand-alone library
Add full tests