Merge pull request #7 from madmimi/refactor

Code improvements
Add inline mode for testing
Document inline mode