Reordered declarations. Added documentation. Cleaned exports.
Added documentation.