Fixed constructors and main method