Changes for picbreeder example, added cosine (didn't use it).
Also had some library loading difficulties and made some mods.