add partition output to both kernels
Some reorganization

- add barrier and move copy to later point in time
- some import reorganization
- spike returns X now