Automatic detection of tests

An attempt to automatically detect all tests without having them hardcoded in the code (issue #13).