Improved .py class template