Potential Fixes

Added the if statements that were in the main loop to libraries. Also
added a for loop to the main loop to turn blocks on and off.