Refactoring Blog Panel JS Controller