Unit testing & bug repair