Took out php functions and put them elsewhere, added jquery ajax calls for reroll functionality