Refactored readings online access script