Added some more documentation. Changed how functions are accessed.