Fixing compilation errors
Adding basic material loading from text file