added config file. reworked structure.

added config file for options.
reworked structure of code with help from @jabjabjab