Added more functions and exceptions