Fixed various inconsistencies and added references.