Refactored classes to make it more readable and introduced parameter
object.