Import of the program code; Restructured for better reusage; Added License