Refactor data structures unused in bellbird and minor code formatting.