trying to organize files, breaks things

tried to separate things into another file, but the code is somehow
broken now.