Initial commit of core code