Adds lib file and moves random_assignment into it