move function declarations and type definitions in seperate files