Moved throttle into class and separate module

This fixes #3