First complete version, running without errors