Removed code duplication. ceilscan and florscan functions are now merged in one