Move code into a lightcrafter class