Fixed minor bug. Added constant and documentation.