Finished bit mask definitions and additional documentation in comments.