URI work and module work also clean up refactoring and error handling.