updated
serious bugfix for vector{2,3} for swapping and removed dependence on unused headers
bugfix for posterior matrix resizing
bugfix for posterior assignment: compute posterior before assignment!