adding a bunch of explanatory comments and putting a BASE_URL variable in