Re-organized misc algos