Create main.py

Initial work creating backend classes and functions.