Removed state from the helpers and renamed some key variables