added randomization and fixed viewer
whitespace nits