core: separate functionality into files