ignoring comments while reading file. Restructuring the application