1) Create a global lesson / status object - so it could be accessible from any pages;
2) Consolidate status related functions from three places to one - remove the duplicate codes;
3) Better names for functions - to make the purpose of function clear;
4) Additional error handling - check response from API call before accessing the file
1) Create a global lesson / status object - so it could be accessible from any pages; 2) Consolidate status related functions from three places to one - remove the duplicate codes; 3) Better names for functions - to make the purpose of function clear; 4) Additional error handling - check response from API call before accessing the file