move all code into /core dir