Added documentation and features such as saturation.