Improved preprocessing capabilities. Wrote documentation. Other changes.