Add core files. Bug ridden, work in progress