Some cleanup and implemented auth keys