move exceptions under namespace + format code