add internal documentation

closes #5