changed program structure to allow for other file formats
Added support for dictionary formats