Initial commit. Adding legacy code