Added basic filtering for which tests to run
Various bug fixes