File can now be opened from command line arg. Fixes #13
Moved helper functions into their own module, tools