Moved CodeMode and friends into scaled.code.