Add settings and some fixes