fix dependencies
bugfixes and extract modules