restructured modules into separate files