project stats added, basic refactoring