ported fully to TS
added images, and factored some code around. Also completed selection of cows