Minor refactoring and adding of a sample file using the strucure given