moved code to src and created core