Added some jsdocs for some of the functions
Fixed some issues with scopes that got lost when they got passed around and made the not-blocks work when the result is inverted