Removed redundant testing def's and added dymanic.