Completely rewrote and added a config file

Commited whole new version of software