Add hook support & query builder