Move typedef's into respective header files. Finish implementation of bucketxi as template.