Importing code from pillowlab git; unit test works

also changed library directory