Begin refactoring instances.py
Srap templates idea