Reworked to restrict access of outside variable calls