added setting page. fixed a few issues