New writable directory. Private module fix.

Cache has been moved to a writable directory.
All private functions in modules have been changed to protected