All done. All that remains are exception handling and docs