Moved things around, more idiomatic
Added missing files