Refactor to remove incomplete modules

TODO: Further tests. Configurable require. Authentication.