Updated structure and added more functions