Separate framework and routing code