Added several self-test features