Added preference test and getinventory debug.