refactored some funtoolkit stuff