Added compile() function.