Add custom split
fix bugs, write files
Merge pull request #13 from Magicjarvis/master

done?