Cleanup and moving core functionaltiy into interfaces package.