Started a major refactoring.
Added an projectstats example model and continued the refactoring.