Added .editorconfig, refactored, working on refraction

Still no dice. Wat.