Initial commit with all the legacy code