quest encapsulation and small fixes