Made random number generator seed default to current time, fixed other minor bugs