Added a bunch more functions