Finished block mask parsing, improved validation, even wrote test cases