Add exception handling, and add string members to data functions