Added code to determine where the floor is..

This should be optimized and moved to a more common location.. I'm not
sure where yet.