Fix minor bugs and create Setting model