Basic callback register, added some docstrings.