Add test files and adjust file structure

Add compiler test
Move create method to `index.js` file
Fix incorrect comments
Add exception of capture
Adjust `compile` return value