First unfinished version of modloader refractoring