Moved function in lib, updated readme