Moving files to lib, removing base64 dep