Added viewer, fixed a few issues