* Fixed missing packages.config
* Minor code reorganisation.