Restructure spec
Fix a bug where type filtering is not working when no block is given
Bump version to 0.5.1