refactoring structure, updated to django 1.7.2