Library file

Added a library file and test file.