Cleans up ban.php to be more readable and maintainable