Cleaned up functions and documentation. Fixed error with split.data.