Fixed two errors which were discovered by trying to run the code in "strict" mode, which is automatically done by Jest testing framework.
This is done in order to be able to re-use that app in API unit tests later