Added specs for require

Did a slight amount of refactoring on `.require` after adding some unit tests