Move code over from LVish without hardly any modification