JavaScript objects drawing themselves into a table