Added more functions (not nearly done yet).