Fix missing device, added more documentation