Code split, closes #3