Reorganization, reformatting, and general cleanup to match existing ExtCore code style.