Refactoring.
Implemented CDN retrieval. Some more refactoring.