Changed some function names, made more intuitive