Add exception support and handling. Fleshed out metadata and stats.