Add assert module
Remove trailing empty line
Check if user is logged in before publishing data
Split handles declaration and initialization