Refactored some stuff using jquery.
Also added a random button.

Signed-off-by: Christine <i2i8@cs.ubc.ca>