Fix old bugs and add new style