Make alien generator into a library, that doesn't touch the page directly