Added comments. Improved wrappers.