Renamed a few things to make them clearer