A lot of new functions (Eldritch Cap!!!!) and

a lot of refactoring...