Better error handling, logging, docs, etc.