Reading from file and basic framework