Changed an if to be more clear
More OOP!
I finally have a hang on prototypes and inheritance in JS, so implementing to make the code simpler.