re-arrange files, and early fixes