Adding a better require model
Correcting minor bug