Started hashing out some functions