Replaced regex-based functions

Now, only the embedded script is working. The embedded CSS doesn't.