Added settings
A LOT of changes, a lot of things are neater now, but probably yielded a few more bugs