Fix compilation errors; Better variable names
Fix parsing of the MASK bit