Still need to sort out the linear analyis but it's much more organised at least.

TODO analyse linear graph and add errors to it.
TODO use peaks to determine period.
TODO sort out the user input handling in main class so that it's easier
to figure out for a stranger.