added methods for parsing scalar and vector files (code cleanup)