Change how requires are done and add tests