Added a bunch of new functions