Made testing framework a bit more generic