Change base_dir from function to module attribute
Removed unused variable