Moved code that should be in theme