Moved some stuff around, trying to resolve issue with multiple requests
Merge commit '181ae988b0e3442deef7c0b85a373c8c954b01ca'
Fixed the bug where app does multiple requests.
Removes unused import
Adds better error handling and UTF-8 file encoding