Added code to hook_init() and hook_theme