Updated controller.py to use a different naming convention for instance tags and fixed bugs