refactored setupPage method
added a control to check the language id value is an integer
changed the behaviour of templatesInUse method which now returns only the template names; updated the ThemesController which uses the templatesInUse method