moved core tests and added some funcitons to dtestlib