Adding tests and library