Initial import of a really disgusting script