Fixed several bugs, hammering out winning logic now.