Moved test code outside lib
Added minified version