refactoring of theme and controller files
 + fixed theme files