Initial work

Keep in mind this is ported code, so my main intent was to get things up to speed with V3. I can make the changes you suggested as well,