Did some renaming to make it more understandable