Refactoring: reduce RAM usage (5 byte variables)