Added main method and constructor