Convert integer to English [FINALIZED]
Given a nonnegative integer up to $999\,999\,999$, write it in English.
The input number can be in any form other than English (though you'll typically want to use the native integer type of your language).
When there are several variants of writing the number in English, you can choose whichever suits you more. For example, the input $120$ may give the output one hundred twenty
or one hundred and twenty
.
The numbers must be formatted as follows:

Twodigit numbers must be written with dashes where applicable e.g.
twentyfive
, nottwenty five
. 
powers of ten start with “one”, e.g.
one hundred
, not justhundred
. 
The tens/ones part, if not zero, must be separated from the hundreds part with
and
, e.g.two hundred and five
, nottwo hundred five
. 
The above rules are applied also to the factors of thousand and million.

moreover the global tens/ones part has bto be separated by
and
whenever anything larger is present, even if the hundreds part is missing. 
Adjacent words must be separated by a single space, or a single dash without space where applicable.

Leading and/or trailing spaces are not allowed. However, if the result is printed, a single trailing newline (not preceded by any spaces) is allowed.
Ungolfed reference implementation
Test cases:
0 zero
1 one
4 four
10 ten
16 sixteen
42 fortytwo
125 one hundred and twentyfive
1024 one thousand and twentyfour
1100 one thousand one hundred
12345 twelve thousand three hundred and fortyfive
1000000 one million
1000001 one million and one
7023000 seven million twentythree thousand
11012021 eleven million twelve thousand and twentyone
999999999 nine hundred and ninetynine million nine hundred and ninetynine thousand nine hundred and ninetynine
2 comment threads