Move the generate stubs into it's own file