Bug fixes: diff func names; $.inArray doesn't return boolean