Adding better paths and cleaner code

Don't use this one. I have fixed the bugs going on and here and everything works fine now. I have all the updated stuff ready to be pulled once you discard this one