Moved middleware's content to visits.py
Moved context processor's methods to visits.py