Using the Loot API functions

Beginning to hook up the checks for loot. Works partially. Can catch and
handle event but isn't fully working yet.