Moved folio main code to folio.py rather than init