more refactoring, almost ready to start playing stuff