More refactoring
Fix API test
Merge branch 'release-1.1.0' of github.com:ngerakines/preview into release-1.1.0