Move some logic from main.py functions to page methods