Nearly finished library and working test file