housecleaning and $base_url removal where unnecessary