Rename function and replace empty string comparison
Rename some variables + fix PEP8 style