Moved program functionality to separate class