Add a story panel and fixed a lot of bugs