Made more changes to deal with variables