Code formatting
Removed global variables