Main Class implementation