Add script hooks & db setup code