added filemodule, refactored core module