Removed more extraneous stuff, modularized getting the speed.