Add tests for indep. and dep. platform filter, fix some bugs