Cleaned up the Sparkfun code a bit