Made everything a function