heavily refactors block mask
fixes all compile time errors from previous refactoring
more refactorinG
more changes. syncing