Changed code so that create_posecell_weights is in a new class called Weights