Various quick and dirty algorithms, implemented mainly in java