Improved awaycheck, added hug support and 'improved' code