Fixes

A few fixes...

The Highlights:
- improved regex
- settable cache directory
- usable without cache directory (but not recommended)
- code clean up