Add config class to simplify construction of api, add referrer support
updated readme