Code cleanup and fixing some issues with private users
Taking the correct internal way to set a 404