Main script

Simple derivative functionality.