Made some nicer code