Added class to store compiled scripts

This should prevent unnecessary cpu usage if a script runs multiple
times.