added settings and fixed controls