Uploading codebase

Currently external. Just putting this up there until I have time to
merge it.