Correcting the if statement to trow an exception if the overlay is too tall/wide
Refactoring a function to use the class property rather than passing it in