Added cookies, changed id system