Changing python template to add class and main features