Restructured and extended configuration

It is now much more well documented. Also added option to change cache size. 

Fixes #156