Add logging and viewer

but viewer has no style