Add split function.
Fix some module issues.