Major rewrite. Retrieving bucket contents now works.