Started hashing out low-level functions.