Separated constructor into several methods, removed main