Fix some bugs and improve styling.