Translated variable names to english
Translated existing comments to english
Added comments
Refactored core logic to separate functions
Fixed indentations
More refactoring

Update rendering method